﻿using System;

namespace Ecobee.Net
{
	public enum HvacSetMode
	{
		None,
		Auto,
		AuxHeatOnly,
		Cool,
		Heat
	}

	public enum VentilatorSetMode
	{
		None,
		Auto,
		MinOnTime,
		On,
		Off
	}

	public enum HumidifierSetMode
	{
		None,
		Auto,
		Manual,
		Off
	}

	public enum HoldEndTime
	{
		None,
		UseEndTime,
		UseEndTime2hour,
		NextPeriod,
		Indefinite,
		UpdateProgram,
		AskMe
	}

	public enum DehumidifierSetMode
	{
		None,
		Auto,
		Manual,
		Off
	}

	/// <summary>
	/// The Settings contains all the configuration properties of the thermostat.
	/// </summary>
	public class Settings : ApiObject
	{
		#region Private Fields
		private HvacSetMode _hvacMode = HvacSetMode.None;
		private DateTime? _lastServiceDate = null;
		private bool _serviceRemindMe = false;
		private int _monthsBetweenService = 0;
		private DateTime? _remindMeDate = null;
		private VentilatorSetMode _vent = VentilatorSetMode.None;
		private int _ventilatorMinOnTime = 0;
		private bool _serviceRemindTechnician = false;
		private string _eiLocation = string.Empty;
		private int _coldTempAlert = 0;
		private bool _coldTempAlertEnabled = false;
		private int _hotTempAlert = 0;
		private bool _hotTempAlertEnabled = false;
		private int _coolStages = 0;
		private int _heatStages = 0;
		private int _maxSetBack = 0;
		private int _maxSetForward = 0;
		private int _quickSaveSetBack = 0;
		private int _quickSaveSetForward = 0;
		private bool _hasHeatPump = false;
		private bool _hasForcedAir = false;
		private bool _hasBoiler = false;
		private bool _hasHumidifier = false;
		private bool _hasErv = false;
		private bool _hasHrv = false;
		private bool _condensationAvoid = false;
		private bool _useCelsius = false;
		private bool _useTimeFormat12 = false;
		private string _locale = string.Empty;
		private string _humidity = string.Empty;
		private HumidifierSetMode _humidifierMode = HumidifierSetMode.None;
		private int _backlightOnIntensity = 0;
		private int _backlightSleepIntensity = 0;
		private int _backlightOffTime = 0;
		private int _soundTickVolume = 0;
		private int _soundAlertVolume = 0;
		private int _compressorProtectionMinTime = 0;
		private int _compressorProtectionMinTemp = 0;
		private int _stage1HeatingDifferentialTemp = 0;
		private int _stage1CoolingDifferentialTemp = 0;
		private int _stage1HeatingDissipationTime = 0;
		private int _stage1CoolingDissipationTime = 0;
		private bool _heatPumpReversalOnCool = false;
		private bool _fanControlRequired = false;
		private int _fanMinOnTime = 0;
		private int _heatCoolMinDelta = 0;
		private int _tempCorrection = 0;
		private HoldEndTime _holdAction = HoldEndTime.None;
		private bool _heatPumpGroundWater = false;
		private bool _hasElectric = false;
		private bool _hasDehumidifier = false;
		private DehumidifierSetMode _dehumidifierMode = DehumidifierSetMode.None;
		private int _dehumidifierLevel = 0;
		private bool _dehumidifyWithAc = false;
		private bool _autoHeatCoolFeatureEnabled = false;
		private bool _wifiOfflineAlert = false;
		private int _heatMinTemp = 0;
		private int _heatMaxTemp = 0;
		private int _coolMinTemp = 0;
		private int _coolMaxTemp = 0;
		private int _heatRangeHigh = 0;
		private int _heatRangeLow = 0;
		private int _coolRangeHigh = 0;
		private int _coolRangeLow = 0;
		private string _userAccessCode = string.Empty;
		private int _userAccessSetting = 0;
		private int _auxRuntimeAlert = 0;
		private int _auxOutdoorTempAlert = 0;
		private int _auxMaxOutdoorTemp = 0;
		private bool _auxRuntimeAlertNotify = false;
		private bool _auxOutdoorTempAlertNotify = false;
		private bool _auxRuntimeAlertNotifyTechnician = false;
		private bool _auxOutdoorTempAlertNotifyTechnician = false;
		private bool _disablePreHeating = false;
		private bool _disablePreCooling = false;
		private bool _installerCodeRequired = false;
		private string _drAccept = string.Empty;
		private bool _isRentalProperty = false;
		private bool _useZoneController = false;
		private int _randomStartDelayCool = 0;
		private int _randomStartDelayHeat = 0;
		private int _humidityHighAlert = 0;
		private int _humidityLowAlert = 0;
		private bool _disableHeatPumpAlerts = false;
		private bool _disableAlertsOnIdt = false;
		private bool _humidityAlertNotify = false;
		private bool _humidityAlertNotifyTechnician = false;
		private bool _tempAlertNotify = false;
		private bool _tempAlertNotifyTechnician = false;
		private int _monthlyElectricityBillLimit = 0;
		private bool _enableElectricityBillAlert = false;
		private bool _enableProjectedElectricityBillAlert = false;
		private int _elecricityBillingDayOfMonth = 0;
		private int _electricityBillCycleMonths = 0;
		private int _electricityBillStartMonth = 0;
		#endregion

		/// <summary>
		/// The current HVAC mode the thermostat is in. Values: auto, auxHeatOnly, cool, heat, off. 
		/// </summary>
		public HvacSetMode HvacMode
		{
			get
			{
				return _hvacMode;
			}
			set
			{
				this.SetProperty(ref _hvacMode, value);
			}
		}

		/// <summary>
		/// The last service date of the HVAC equipment.
		/// </summary>
		public DateTime? LastServiceDate
		{
			get
			{
				return _lastServiceDate;
			}
			set
			{
				this.SetProperty(ref _lastServiceDate, value);
			}
		}

		/// <summary>
		/// Whether to send an alert when service is required again.
		/// </summary>
		public bool ServiceRemindMe
		{
			get
			{
				return _serviceRemindMe;
			}
			set
			{
				this.SetProperty(ref _serviceRemindMe, value);
			}
		}

		/// <summary>
		/// The user configured monthly interval between HVAC service reminders.
		/// </summary>
		public int MonthsBetweenService
		{
			get
			{
				return _monthsBetweenService;
			}
			set
			{
				this.SetProperty(ref _monthsBetweenService, value);
			}
		}

		/// <summary>
		/// Date to be reminded about the next HVAC service date.
		/// </summary>
		public DateTime? RemindMeDate
		{
			get
			{
				return _remindMeDate;
			}
			set
			{
				this.SetProperty(ref _remindMeDate, value);
			}
		}

		/// <summary>
		/// The ventilator mode. Values: auto, minontime, on, off.
		/// </summary>
		public VentilatorSetMode Vent
		{
			get
			{
				return _vent;
			}
			set
			{
				this.SetProperty(ref _vent, value);
			}
		}

		/// <summary>
		/// The minimum time in minutes the ventilator is configured to run. The thermostat will always guarantee 
		/// that the ventilator runs for this minimum duration whenever engaged.
		/// </summary>
		public int VentilatorMinOnTime
		{
			get
			{
				return _ventilatorMinOnTime;
			}
			set
			{
				this.SetProperty(ref _ventilatorMinOnTime, value);
			}
		}

		/// <summary>
		/// Whether the technician associated with this thermostat should receive the HVAC service reminders as well. 
		/// </summary>
		public bool ServiceRemindTechnician
		{
			get
			{
				return _serviceRemindTechnician;
			}
			set
			{
				this.SetProperty(ref _serviceRemindTechnician, value);
			}
		}

		/// <summary>
		/// A note about the physical location where the SMART or EMS Equipment Interface module is located. 
		/// </summary>
		public string EiLocation
		{
			get
			{
				return _eiLocation;
			}
			set
			{
				this.SetProperty(ref _eiLocation, value);
			}
		}

		/// <summary>
		/// The temperature at which a cold temp alert is triggered. 
		/// </summary>
		public int ColdTempAlert
		{
			get
			{
				return _coldTempAlert;
			}
			set
			{
				this.SetProperty(ref _coldTempAlert, value);
			}
		}

		/// <summary>
		/// Whether cold temperature alerts are enabled. 
		/// </summary>
		public bool ColdTempAlertEnabled
		{
			get
			{
				return _coldTempAlertEnabled;
			}
			set
			{
				this.SetProperty(ref _coldTempAlertEnabled, value);
			}
		}

		/// <summary>
		/// The temperature at which a hot temp alert is triggered. 
		/// </summary>
		public int HotTempAlert
		{
			get
			{
				return _hotTempAlert;
			}
			set
			{
				this.SetProperty(ref _hotTempAlert, value);
			}
		}

		/// <summary>
		/// Whether hot temperature alerts are enabled. 
		/// </summary>
		public bool HotTempAlertEnabled
		{
			get
			{
				return _hotTempAlertEnabled;
			}
			set
			{
				this.SetProperty(ref _hotTempAlertEnabled, value);
			}
		}

		/// <summary>
		/// The number of cool stages the connected HVAC equipment supports.
		/// </summary>
		public int CoolStages
		{
			get
			{
				return _coolStages;
			}
			set
			{
				this.SetProperty(ref _coolStages, value);
			}
		}

		/// <summary>
		/// The number of heat stages the connected HVAC equipment supports.
		/// </summary>
		public int HeatStages
		{
			get
			{
				return _heatStages;
			}
			set
			{
				this.SetProperty(ref _heatStages, value);
			}
		}

		/// <summary>
		/// The maximum automated set point set back offset allowed in degrees.
		/// </summary>
		public int MaxSetBack
		{
			get
			{
				return _maxSetBack;
			}
			set
			{
				this.SetProperty(ref _maxSetBack, value);
			}
		}

		/// <summary>
		/// The maximum automated set point set forward offset allowed in degrees.
		/// </summary>
		public int MaxSetForward
		{
			get
			{
				return _maxSetForward;
			}
			set
			{
				this.SetProperty(ref _maxSetForward, value);
			}
		}

		/// <summary>
		/// The set point set back offset, in degrees, configured for a quick save event.
		/// </summary>
		public int QuickSaveSetBack
		{
			get
			{
				return _quickSaveSetBack;
			}
			set
			{
				this.SetProperty(ref _quickSaveSetBack, value);
			}
		}

		/// <summary>
		/// The set point set forward offset, in degrees, configured for a quick save event.
		/// </summary>
		public int QuickSaveSetForward
		{
			get
			{
				return _quickSaveSetForward;
			}
			set
			{
				this.SetProperty(ref _quickSaveSetForward, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling a heat pump.
		/// </summary>
		public bool HasHeatPump
		{
			get
			{
				return _hasHeatPump;
			}
			set
			{
				this.SetProperty(ref _hasHeatPump, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling a forced air furnace.
		/// </summary>
		public bool HasForcedAir
		{
			get
			{
				return _hasForcedAir;
			}
			set
			{
				this.SetProperty(ref _hasForcedAir, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling a boiler.
		/// </summary>
		public bool HasBoiler
		{
			get
			{
				return _hasBoiler;
			}
			set
			{
				this.SetProperty(ref _hasBoiler, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling a humidifier.
		/// </summary>
		public bool HasHumidifier
		{
			get
			{
				return _hasHumidifier;
			}
			set
			{
				this.SetProperty(ref _hasHumidifier, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling an energy recovery ventilator.
		/// </summary>
		public bool HasErv
		{
			get
			{
				return _hasErv;
			}
			set
			{
				this.SetProperty(ref _hasErv, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is controlling a heat recovery ventilator.
		/// </summary>
		public bool HasHrv
		{
			get
			{
				return _hasHrv;
			}
			set
			{
				this.SetProperty(ref _hasHrv, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is in frost control mode.
		/// </summary>
		public bool CondensationAvoid
		{
			get
			{
				return _condensationAvoid;
			}
			set
			{
				this.SetProperty(ref _condensationAvoid, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is using 12hr time format.
		/// </summary>
		public bool UseTimeFormat12
		{
			get
			{
				return _useTimeFormat12;
			}
			set
			{
				this.SetProperty(ref _useTimeFormat12, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is configured to report in degrees Celsius.
		/// </summary>
		public bool UseCelsius
		{
			get
			{
				return _useCelsius;
			}
			set
			{
				this.SetProperty(ref _useCelsius, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public string Locale
		{
			get
			{
				return _locale;
			}
			set
			{
				this.SetProperty(ref _locale, value);
			}
		}

		/// <summary>
		/// The minimum humidity level (in percent) set point for the humidifier.
		/// </summary>
		public string Humidity
		{
			get
			{
				return _humidity;
			}
			set
			{
				this.SetProperty(ref _humidity, value);
			}
		}

		/// <summary>
		/// Humidifier mode. Values: auto, manual, off. 
		/// </summary>
		public HumidifierSetMode HumidifierMode
		{
			get
			{
				return _humidifierMode;
			}
			set
			{
				this.SetProperty(ref _humidifierMode, value);
			}
		}

		/// <summary>
		/// The thermostat backlight intensity when on. A value between 1 and 10.
		/// </summary>
		public int BacklightOnIntensity
		{
			get
			{
				return _backlightOnIntensity;
			}
			set
			{
				this.SetProperty(ref _backlightOnIntensity, value);
			}
		}

		/// <summary>
		/// The thermostat backlight intensity when asleep. A value between 1 and 10.
		/// </summary>
		public int BacklightSleepIntensity
		{
			get
			{
				return _backlightSleepIntensity;
			}
			set
			{
				this.SetProperty(ref _backlightSleepIntensity, value);
			}
		}

		/// <summary>
		/// The time in seconds before the thermostat screen goes into sleep mode.
		/// </summary>
		public int BacklightOffTime
		{
			get
			{
				return _backlightOffTime;
			}
			set
			{
				this.SetProperty(ref _backlightOffTime, value);
			}
		}

		/// <summary>
		/// The volume level for key presses on the thermostat. A value between 1 and 10.
		/// </summary>
		public int SoundTickVolume
		{
			get
			{
				return _soundTickVolume;
			}
			set
			{
				this.SetProperty(ref _soundTickVolume, value);
			}
		}

		/// <summary>
		/// The volume level for alerts on the thermostat. A value between 1 and 10.
		/// </summary>
		public int SoundAlertVolume
		{
			get
			{
				return _soundAlertVolume;
			}
			set
			{
				this.SetProperty(ref _soundAlertVolume, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int CompressorProtectionMinTime
		{
			get
			{
				return _compressorProtectionMinTime;
			}
			set
			{
				this.SetProperty(ref _compressorProtectionMinTime, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int CompressorProtectionMinTemp
		{
			get
			{
				return _compressorProtectionMinTemp;
			}
			set
			{
				this.SetProperty(ref _compressorProtectionMinTemp, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int Stage1HeatingDifferentialTemp
		{
			get
			{
				return _stage1HeatingDifferentialTemp;
			}
			set
			{
				this.SetProperty(ref _stage1HeatingDifferentialTemp, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int Stage1CoolingDifferentialTemp
		{
			get
			{
				return _stage1CoolingDifferentialTemp;
			}
			set
			{
				this.SetProperty(ref _stage1CoolingDifferentialTemp, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int Stage1HeatingDissipationTime
		{
			get
			{
				return _stage1HeatingDissipationTime;
			}
			set
			{
				this.SetProperty(ref _stage1HeatingDissipationTime, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int Stage1CoolingDissipationTime
		{
			get
			{
				return _stage1CoolingDissipationTime;
			}
			set
			{
				this.SetProperty(ref _stage1CoolingDissipationTime, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool HeatPumpReversalOnCool
		{
			get
			{
				return _heatPumpReversalOnCool;
			}
			set
			{
				this.SetProperty(ref _heatPumpReversalOnCool, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool FanControlRequired
		{
			get
			{
				return _fanControlRequired;
			}
			set
			{
				this.SetProperty(ref _fanControlRequired, value);
			}
		}

		/// <summary>
		/// The minimum time, in minutes, to run the fan each hour. Value from 1 to 60.
		/// </summary>
		public int FanMinOnTime
		{
			get
			{
				return _fanMinOnTime;
			}
			set
			{
				this.SetProperty(ref _fanMinOnTime, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int HeatCoolMinDelta
		{
			get
			{
				return _heatCoolMinDelta;
			}
			set
			{
				this.SetProperty(ref _heatCoolMinDelta, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int TempCorrection
		{
			get
			{
				return _tempCorrection;
			}
			set
			{
				this.SetProperty(ref _tempCorrection, value);
			}
		}

		/// <summary>
		/// The default end time setting the thermostat applies to user temperature holds. Values useEndTime, useEndTime2hour, nextPeriod, indefinite, updateProgram, askMe
		/// </summary>
		public HoldEndTime HoldAction
		{
			get
			{
				return _holdAction;
			}
			set
			{
				this.SetProperty(ref _holdAction, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool HeatPumpGroundWater
		{
			get
			{
				return _heatPumpGroundWater;
			}
			set
			{
				this.SetProperty(ref _heatPumpGroundWater, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is connected to an electric HVAC system.
		/// </summary>
		public bool HasElectric
		{
			get
			{
				return _hasElectric;
			}
			set
			{
				this.SetProperty(ref _hasElectric, value);
			}
		}

		/// <summary>
		/// Whether the thermostat is connected to a dehumidifier.
		/// </summary>
		public bool HasDehumidifier
		{
			get
			{
				return _hasDehumidifier;
			}
			set
			{
				this.SetProperty(ref _hasDehumidifier, value);
			}
		}

		/// <summary>
		/// The dehumidifier mode. Values: auto, manual, off. 
		/// </summary>
		public DehumidifierSetMode DehumidifierMode
		{
			get
			{
				return _dehumidifierMode;
			}
			set
			{
				this.SetProperty(ref _dehumidifierMode, value);
			}
		}

		/// <summary>
		/// The dehumidification set point in percentage.
		/// </summary>
		public int DehumidifierLevel
		{
			get
			{
				return _dehumidifierLevel;
			}
			set
			{
				this.SetProperty(ref _dehumidifierLevel, value);
			}
		}

		/// <summary>
		/// Whether the thermostat should use AC overcool to dehumidify. 
		/// </summary>
		public bool DehumidifyWithAc
		{
			get
			{
				return _dehumidifyWithAc;
			}
			set
			{
				this.SetProperty(ref _dehumidifyWithAc, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool AutoHeatCoolFeatureEnabled
		{
			get
			{
				return _autoHeatCoolFeatureEnabled;
			}
			set
			{
				this.SetProperty(ref _autoHeatCoolFeatureEnabled, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool WifiOfflineAlert
		{
			get
			{
				return _wifiOfflineAlert;
			}
			set
			{
				this.SetProperty(ref _wifiOfflineAlert, value);
			}
		}

		/// <summary>
		/// The minimum heat set point allowed by the thermostat firmware.
		/// </summary>
		public int HeatMinTemp
		{
			get
			{
				return _heatMinTemp;
			}
			set
			{
				this.SetProperty(ref _heatMinTemp, value);
			}
		}

		/// <summary>
		/// The maximum heat set point allowed by the thermostat firmware.
		/// </summary>
		public int HeatMaxTemp
		{
			get
			{
				return _heatMaxTemp;
			}
			set
			{
				this.SetProperty(ref _heatMaxTemp, value);
			}
		}

		/// <summary>
		/// The minimum cool set point allowed by the thermostat firmware.
		/// </summary>
		public int CoolMinTemp
		{
			get
			{
				return _coolMinTemp;
			}
			set
			{
				this.SetProperty(ref _coolMinTemp, value);
			}
		}

		/// <summary>
		/// The maximum cool set point allowed by the thermostat firmware.
		/// </summary>
		public int CoolMaxTemp
		{
			get
			{
				return _coolMaxTemp;
			}
			set
			{
				this.SetProperty(ref _coolMaxTemp, value);
			}
		}

		/// <summary>
		/// The maximum heat set point configured by the user's preferences.
		/// </summary>
		public int HeatRangeHigh
		{
			get
			{
				return _heatRangeHigh;
			}
			set
			{
				this.SetProperty(ref _heatRangeHigh, value);
			}
		}

		/// <summary>
		/// The minimum heat set point configured by the user's preferences.
		/// </summary>
		public int HeatRangeLow
		{
			get
			{
				return _heatRangeLow;
			}
			set
			{
				this.SetProperty(ref _heatRangeLow, value);
			}
		}

		/// <summary>
		/// The maximum cool set point configured by the user's preferences.
		/// </summary>
		public int CoolRangeHigh
		{
			get
			{
				return _coolRangeHigh;
			}
			set
			{
				this.SetProperty(ref _coolRangeHigh, value);
			}
		}

		/// <summary>
		/// The minimum heat set point configured by the user's preferences.
		/// </summary>
		public int CoolRangeLow
		{
			get
			{
				return _coolRangeLow;
			}
			set
			{
				this.SetProperty(ref _coolRangeLow, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public string UserAccessCode
		{
			get
			{
				return _userAccessCode;
			}
			set
			{
				this.SetProperty(ref _userAccessCode, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int UserAccessSetting
		{
			get
			{
				return _userAccessSetting;
			}
			set
			{
				this.SetProperty(ref _userAccessSetting, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int AuxRuntimeAlert
		{
			get
			{
				return _auxRuntimeAlert;
			}
			set
			{
				this.SetProperty(ref _auxRuntimeAlert, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int AuxOutdoorTempAlert
		{
			get
			{
				return _auxOutdoorTempAlert;
			}
			set
			{
				this.SetProperty(ref _auxOutdoorTempAlert, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public int AuxMaxOutdoorTemp
		{
			get
			{
				return _auxMaxOutdoorTemp;
			}
			set
			{
				this.SetProperty(ref _auxMaxOutdoorTemp, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool AuxRuntimeAlertNotify
		{
			get
			{
				return _auxRuntimeAlertNotify;
			}
			set
			{
				this.SetProperty(ref _auxRuntimeAlertNotify, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool AuxOutdoorTempAlertNotify
		{
			get
			{
				return _auxOutdoorTempAlertNotify;
			}
			set
			{
				this.SetProperty(ref _auxOutdoorTempAlertNotify, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool AuxRuntimeAlertNotifyTechnician
		{
			get
			{
				return _auxRuntimeAlertNotifyTechnician;
			}
			set
			{
				this.SetProperty(ref _auxRuntimeAlertNotifyTechnician, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool AuxOutdoorTempAlertNotifyTechnician
		{
			get
			{
				return _auxOutdoorTempAlertNotifyTechnician;
			}
			set
			{
				this.SetProperty(ref _auxOutdoorTempAlertNotifyTechnician, value);
			}
		}

		/// <summary>
		/// Whether the thermostat should use pre heating to reach the set point on time.
		/// </summary>
		public bool DisablePreHeating
		{
			get
			{
				return _disablePreHeating;
			}
			set
			{
				this.SetProperty(ref _disablePreHeating, value);
			}
		}

		/// <summary>
		/// Whether the thermostat should use pre cooling to reach the set point on time. 
		/// </summary>
		public bool DisablePreCooling
		{
			get
			{
				return _disablePreCooling;
			}
			set
			{
				this.SetProperty(ref _disablePreCooling, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool InstallerCodeRequired
		{
			get
			{
				return _installerCodeRequired;
			}
			set
			{
				this.SetProperty(ref _installerCodeRequired, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public string DrAccept
		{
			get
			{
				return _drAccept;
			}
			set
			{
				this.SetProperty(ref _drAccept, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool IsRentalProperty
		{
			get
			{
				return _isRentalProperty;
			}
			set
			{
				this.SetProperty(ref _isRentalProperty, value);
			}
		}

		/// <summary>
		/// 
		/// </summary>
		public bool UseZoneController
		{
			get
			{
				return _useZoneController;
			}
			set
			{
				this.SetProperty(ref _useZoneController, value);
			}
		}

		/// <summary>
		/// Whether random start delay is enabled for cooling.
		/// </summary>
		public int RandomStartDelayCool
		{
			get
			{
				return _randomStartDelayCool;
			}
			set
			{
				this.SetProperty(ref _randomStartDelayCool, value);
			}
		}

		/// <summary>
		/// Whether random start delay is enabled for heating.
		/// </summary>
		public int RandomStartDelayHeat
		{
			get
			{
				return _randomStartDelayHeat;
			}
			set
			{
				this.SetProperty(ref _randomStartDelayHeat, value);
			}
		}

		/// <summary>
		/// The humidity level to trigger a high humidity alert.
		/// </summary>
		public int HumidityHighAlert
		{
			get
			{
				return _humidityHighAlert;
			}
			set
			{
				this.SetProperty(ref _humidityHighAlert, value);
			}
		}

		/// <summary>
		/// The humidity level to trigger a low humidity alert.
		/// </summary>
		public int HumidityLowAlert
		{
			get
			{
				return _humidityLowAlert;
			}
			set
			{
				this.SetProperty(ref _humidityLowAlert, value);
			}
		}

		/// <summary>
		/// Whether heat pump alerts are disabled.
		/// </summary>
		public bool DisableHeatPumpAlerts
		{
			get
			{
				return _disableHeatPumpAlerts;
			}
			set
			{
				this.SetProperty(ref _disableHeatPumpAlerts, value);
			}
		}

		/// <summary>
		/// Whether alerts are disabled from showing on the thermostat.
		/// </summary>
		public bool DisableAlertsOnIdt
		{
			get
			{
				return _disableAlertsOnIdt;
			}
			set
			{
				this.SetProperty(ref _disableAlertsOnIdt, value);
			}
		}

		/// <summary>
		/// Whether humidification alerts are enabled to the thermostat owner.
		/// </summary>
		public bool HumidityAlertNotify
		{
			get
			{
				return _humidityAlertNotify;
			}
			set
			{
				this.SetProperty(ref _humidityAlertNotify, value);
			}
		}

		/// <summary>
		/// Whether humidification alerts are enabled to the technician associated with the thermostat.
		/// </summary>
		public bool HumidityAlertNotifyTechnician
		{
			get
			{
				return _humidityAlertNotifyTechnician;
			}
			set
			{
				this.SetProperty(ref _humidityAlertNotifyTechnician, value);
			}
		}

		/// <summary>
		/// Whether temperature alerts are enabled to the thermostat owner.
		/// </summary>
		public bool TempAlertNotify
		{
			get
			{
				return _tempAlertNotify;
			}
			set
			{
				this.SetProperty(ref _tempAlertNotify, value);
			}
		}

		/// <summary>
		/// Whether temperature alerts are enabled to the technician associated with the thermostat.
		/// </summary>
		public bool TempAlertNotifyTechnician
		{
			get
			{
				return _tempAlertNotifyTechnician;
			}
			set
			{
				this.SetProperty(ref _tempAlertNotifyTechnician, value);
			}
		}

		/// <summary>
		/// The dollar amount the owner specifies for their desired maximum electricity bill.
		/// </summary>
		public int MonthlyElectricityBillLimit
		{
			get
			{
				return _monthlyElectricityBillLimit;
			}
			set
			{
				this.SetProperty(ref _monthlyElectricityBillLimit, value);
			}
		}

		/// <summary>
		/// Whether electricity bill alerts are enabled.
		/// </summary>
		public bool EnableElectricityBillAlert
		{
			get
			{
				return _enableElectricityBillAlert;
			}
			set
			{
				this.SetProperty(ref _enableElectricityBillAlert, value);
			}
		}

		/// <summary>
		/// Whether electricity bill projection alerts are enabled.
		/// </summary>
		public bool EnableProjectedElectricityBillAlert
		{
			get
			{
				return _enableProjectedElectricityBillAlert;
			}
			set
			{
				this.SetProperty(ref _enableProjectedElectricityBillAlert, value);
			}
		}

		/// <summary>
		/// The day of the month the owner's electricity usage is billed.
		/// </summary>
		public int ElecricityBillingDayOfMonth
		{
			get
			{
				return _elecricityBillingDayOfMonth;
			}
			set
			{
				this.SetProperty(ref _elecricityBillingDayOfMonth, value);
			}
		}

		/// <summary>
		/// The owners billing cycle duration in months.
		/// </summary>
		public int ElectricityBillCycleMonths
		{
			get
			{
				return _electricityBillCycleMonths;
			}
			set
			{
				this.SetProperty(ref _electricityBillCycleMonths, value);
			}
		}

		/// <summary>
		/// The annual start month of the owners billing cycle.
		/// </summary>
		public int ElectricityBillStartMonth
		{
			get
			{
				return _electricityBillStartMonth;
			}
			set
			{
				this.SetProperty(ref _electricityBillStartMonth, value);
			}
		}

		protected override void OnFromDataObject(dynamic dataObject)
		{
			this.HvacMode = dataObject.hvacMode;
			this.LastServiceDate = dataObject.lastServiceDate;
			this.ServiceRemindMe = dataObject.serviceRemindMe;
			this.MonthsBetweenService = dataObject.monthsBetweenService;
			this.RemindMeDate = dataObject.remindMeDate;
			this.Vent = dataObject.vent;
			this.VentilatorMinOnTime = dataObject.ventilatorMinOnTime;
			this.ServiceRemindTechnician = dataObject.serviceRemindTechnician;
			this.EiLocation = dataObject.eiLocation;
			this.ColdTempAlert = dataObject.coldTempAlert;
			this.ColdTempAlertEnabled = dataObject.coldTempAlertEnabled;
			this.HotTempAlert = dataObject.hotTempAlert;
			this.HotTempAlertEnabled = dataObject.hotTempAlertEnabled;
			this.CoolStages = dataObject.coolStages;
			this.HeatStages = dataObject.heatStages;
			this.MaxSetBack = dataObject.maxSetBack;
			this.MaxSetForward = dataObject.maxSetForward;
			this.QuickSaveSetBack = dataObject.quickSaveSetBack;
			this.QuickSaveSetForward = dataObject.quickSaveSetForward;
			this.HasHeatPump = dataObject.hasHeatPump;
			this.HasForcedAir = dataObject.hasForcedAir;
			this.HasBoiler = dataObject.hasBoiler;
			this.HasHumidifier = dataObject.hasHumidifier;
			this.HasErv = dataObject.hasErv;
			this.HasHrv = dataObject.hasHrv;
			this.CondensationAvoid = dataObject.condensationAvoid;
			this.UseCelsius = dataObject.useCelsius;
			this.UseTimeFormat12 = dataObject.useTimeFormat12;
			this.Locale = dataObject.locale;
			this.Humidity = dataObject.humidity;
			this.HumidifierMode = dataObject.humidifierMode;
			this.BacklightOnIntensity = dataObject.backlightOnIntensity;
			this.BacklightSleepIntensity = dataObject.backlightSleepIntensity;
			this.BacklightOffTime = dataObject.backlightOffTime;
			this.SoundTickVolume = dataObject.soundTickVolume;
			this.SoundAlertVolume = dataObject.soundAlertVolume;
			this.CompressorProtectionMinTime = dataObject.compressorProtectionMinTime;
			this.CompressorProtectionMinTemp = dataObject.compressorProtectionMinTemp;
			this.Stage1HeatingDifferentialTemp = dataObject.stage1HeatingDifferentialTemp;
			this.Stage1CoolingDifferentialTemp = dataObject.stage1CoolingDifferentialTemp;
			this.Stage1HeatingDissipationTime = dataObject.stage1HeatingDissipationTime;
			this.Stage1CoolingDissipationTime = dataObject.stage1CoolingDissipationTime;
			this.HeatPumpReversalOnCool = dataObject.heatPumpReversalOnCool;
			this.FanControlRequired = dataObject.fanControlRequired;
			this.FanMinOnTime = dataObject.fanMinOnTime;
			this.HeatCoolMinDelta = dataObject.heatCoolMinDelta;
			this.TempCorrection = dataObject.tempCorrection;
			this.HoldAction = dataObject.holdAction;
			this.HeatPumpGroundWater = dataObject.heatPumpGroundWater;
			this.HasElectric = dataObject.hasElectric;
			this.HasDehumidifier = dataObject.hasDehumidifier;
			this.DehumidifierMode = dataObject.dehumidifierMode;
			this.DehumidifierLevel = dataObject.dehumidifierLevel;
			this.DehumidifyWithAc = dataObject.dehumidifyWithAC;
			this.AutoHeatCoolFeatureEnabled = dataObject.autoHeatCoolFeatureEnabled;
			this.WifiOfflineAlert = dataObject.wifiOfflineAlert;
			this.HeatMinTemp = dataObject.heatMinTemp;
			this.HeatMaxTemp = dataObject.heatMaxTemp;
			this.CoolMinTemp = dataObject.coolMinTemp;
			this.CoolMaxTemp = dataObject.coolMaxTemp;
			this.HeatRangeHigh = dataObject.heatRangeHigh;
			this.HeatRangeLow = dataObject.heatRangeLow;
			this.CoolRangeHigh = dataObject.coolRangeHigh;
			this.CoolRangeLow = dataObject.coolRangeLow;
			this.UserAccessCode = dataObject.userAccessCode;
			this.UserAccessSetting = dataObject.userAccessSetting;
			this.AuxRuntimeAlert = dataObject.auxRuntimeAlert;
			this.AuxOutdoorTempAlert = dataObject.auxOutdoorTempAlert;
			this.AuxRuntimeAlertNotify = dataObject.auxRuntimeAlertNotify;
			this.AuxOutdoorTempAlertNotify = dataObject.auxOutdoorTempAlertNotify;
			this.AuxRuntimeAlertNotifyTechnician = dataObject.auxRuntimeAlertNotifyTechnician;
			this.AuxOutdoorTempAlertNotifyTechnician = dataObject.auxOutdoorTempAlertNotifyTechnician;
			this.DisablePreHeating = dataObject.disablePreHeating;
			this.DisablePreCooling = dataObject.disablePreCooling;
			this.InstallerCodeRequired = dataObject.installerCodeRequired;
			this.DrAccept = dataObject.drAccept;
			this.IsRentalProperty = dataObject.isRentalProperty;
			this.UseZoneController = dataObject.useZoneController;
			this.RandomStartDelayCool = dataObject.randomStartDelayCool;
			this.RandomStartDelayHeat = dataObject.randomStartDelayHeat;
			this.HumidityHighAlert = dataObject.humidityHighAlert;
			this.HumidityLowAlert = dataObject.humidityLowAlert;
			this.DisableHeatPumpAlerts = dataObject.disableHeatPumpAlerts;
			this.DisableAlertsOnIdt = dataObject.disableAlertsOnIdt;
			this.HumidityAlertNotify = dataObject.humidityAlertNotify;
			this.HumidityAlertNotifyTechnician = dataObject.humidityAlertNotifyTechnician;
			this.TempAlertNotify = dataObject.tempAlertNotify;
			this.TempAlertNotifyTechnician = dataObject.tempAlertNotifyTechnician;
			this.MonthlyElectricityBillLimit = dataObject.monthlyElectricityBillLimit;
			this.EnableElectricityBillAlert = dataObject.enableElectricityBillAlert;
			this.EnableProjectedElectricityBillAlert = dataObject.enableProjectedElectricityBillAlert;
			this.ElecricityBillingDayOfMonth = dataObject.elecricityBillingDayOfMonth;
			this.ElectricityBillCycleMonths = dataObject.electricityBillCycleMonths;
			this.ElectricityBillStartMonth = dataObject.electricityBillStartMonth;
		}
	}
}